package org.flowable.editor.language.json.converter;

import com.asus.sun.extend.nodeAttr.BruceUserTaskJsonConverter;

/**
 * Created by Lenovo on 2019/8/12.
 */
public class CustomPropertyInit extends BpmnJsonConverter {
    public void init() {
    /*   异常如下： Class not loaded : org.flowable.editor.language.json.converter.BpmnJsonConverter
    tried to access field org.flowable.editor.language.json.converter.BpmnJsonConverter.convertersToJsonMap
   故 不直接 使用BpmnJsonConverter.convertersToBpmnMap;  采用 继承
    * */

//        Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap = BpmnJsonConverter.convertersToJsonMap;
//        Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap = BpmnJsonConverter.convertersToBpmnMap;

        //添加自定义的任务json转化器
        BruceUserTaskJsonConverter.setCustomTypes(convertersToBpmnMap, convertersToJsonMap);
    }
}
